<?php
!defined('DEBUG') AND exit('Access Denied.');
define('QUESTIONS_NUM' , 15);//问题的条数
define('ANSWER_NEWLINE' , '<br/>');//回答中的换行符


$pathname = param('pathname');
$doctype = param('doctype');
$fd_name = param('fdname');
$question_count = param('questioncount',0);//指定问题数量

empty($pathname) AND $pathname = 'docs';
if($question_count == 0) $question_count = QUESTIONS_NUM;
if(stripos($pathname,'upload/') === FALSE && stripos($pathname,'upload\\')=== FALSE){
    $pathname = 'upload/'.$pathname;
}
$pathname = APP_PATH .$pathname;

$err_message = $down_file_name = '';

$validpwd = false;
switch($doctype){
    case 'xjdlzgft':
    case 'gdhmzgft':
        if($_REQUEST['optpwd'] == 'HmGd19761125!') $validpwd = true;
        break;
    default:
        break;
}
require_once APP_PATH . 'plugin/ghx_parsedoc/inc/simple_html_dom.php';
require_once APP_PATH . 'plugin/ghx_parsedoc/inc/domfuns.php';

if(array_key_exists('optpwd',$_REQUEST)){
    if (is_dir($pathname)) {
    if($validpwd) {
        $alldocs = array();
        $handle = opendir($pathname);
        while (false !== ($file = readdir($handle))) {
            if ($file != '.' && $file != '..' && strripos($file, '.html') == strlen($file) - 5) {
                $newKey = $file;
                $new_key_id = 0;
                while(array_key_exists($newKey,$alldocs)){
                    $new_key_id++;
                    $newKey = $file.'_'.$new_key_id;
                }
                $alldocs[$newKey] = $pathname . DIRECTORY_SEPARATOR . $file;
            }
        }
        closedir($handle);
        if (!empty($alldocs)) {
            ini_set("max_execution_time", 2700); // 修改最大执行时间s 45分钟
            ini_set("memory_limit", 1048576000); //修改此次的最大运行内存 Byte 1000 兆，即 1G

            $anonymous_id = 0;//匿名ID号
            $html = null;
            $docDatasQueue = array();
            $ErrMsg = array();//错误信息
            foreach($alldocs as $dkey => &$docdom) {
                $docdatas = array();
                $html = new simple_html_dom();//新建一个Dom实例
                $html->load_file($docdom);//从文件中加载
                if ($html->size >0 && count($html->nodes) > 1) {
                    $body = $html->find('body', 0);
                    if (!empty($body) && count($body->children) > 0) {

                        if ($doctype == 'xjdlzgft') {//新疆电力职工访谈
                            $table = $body->find('table', 0);
                            $rows = select_elements($table,'tr','>');
                            if (count($rows) == 0) {
                                $tbody1 = $body->find('tbody', 0);
                                $rows = select_elements($tbody1,'tr','>');
                            }
                            //先取得文档标题:
                            $levels1 = select_elements($body,'p','>');
                            select_elements($body,'div','>',$levels1);
                            if (count($levels1) > 0){
                                $lineselect1 = null;
                                $dkey_p = strrpos($dkey,'.',1);
                                $dkey_t = substr($dkey,0,$dkey_p);
                                unset($dkey_p);
                                foreach($levels1 as $eflag => &$edom){
                                    $edomhtml = $edom->innertext();
                                    $linew = trim(strip_tags($edomhtml));
                                    if(xn_strlen($linew) > 10){
                                        $gspos = strpos($linew,'公司');
                                        if($gspos === false) $gspos = strpos($linew,'集团');
                                        if($gspos > 0){
                                            $docdatas['单位'] = substr($linew,0,$gspos + strlen('公司'));
                                        }
                                        else{
                                            $docdatas['单位'] = str_replace('青年职工访谈记录表','',$linew);
                                        }
                                        $docdatas['文档名'] = $dkey_t;
                                        $lineselect1 = null;
                                        break;
                                    }
                                    if($lineselect1 == null) $lineselect1 = $linew;
                                }
                                if(!empty($lineselect1)){
                                    $docdatas['单位'] = '';
                                    $docdatas['文档名'] =$dkey_t;
                                }

                            }
                            if(count($rows) > 3){
                                //读取一般项(第一,二行):
                                $tds = select_elements($rows[0],'td','>');
                                select_elements($rows[1],'td','>',$tds);
                                for($i=0;$i<count($tds);$i++){
                                    $dik = preg_replace('/^[\s　]+|[\s　]+$/us','',strip_tags($tds[$i]->innertext()));
                                    if(!empty($dik)){
                                        $i++;
                                        if($i < count($tds)){
                                            $div = preg_replace('/^[\s　]+|[\s　]+$/us','',strip_tags($tds[$i]->innertext()));
                                            $docdatas[$dik] = $div;
                                        }
                                        else{
                                            $ErrMsg[$dkey] = '文档访谈内容不规范!';  //记录错误
                                            continue 2;
                                        }

                                    }
                                }
                                //岗位类别,行三:
                                $row3h = trim(strip_tags($rows[2]->find('td', 0)->innertext()));
                                $gwlb = '';
                                $tds = $rows[2]->find('td', 1);
                                if($tds != null){
                                    $tmp_td_html = trim($tds->text());
                                    $gwlb = GetDomSelectValue($tmp_td_html);
                                }
                                $docdatas[$row3h] = $gwlb;
                                $del_lines = array('一、思想动态方面','二、工作方面','三、个人生活方面','四、工会方面','五、青年婚恋方面');
                                //处理访谈内容:
                                $qwlines = array();
                                $inlovehtml = null;
                                for($j=3;$j<count($rows);$j++){
                                    $inhtml = $rows[$j]->innertext();
                                    if(strpos($inhtml,'当下国家的发展形势如何') > 0){
                                        //婚恋单选题另外处理
                                        if(empty($inlovehtml)) {
                                            $naqp = strpos($inhtml, $del_lines[4]);
                                            if ($naqp > 0) {
                                                $naqp1 = strpos($inhtml, '以下哪个因素对您的婚恋观念影响比较大', $naqp + 1);
                                                if ($naqp1 !== false) {
                                                    $naqp2 = strpos($inhtml, '您认为幸福的婚姻', $naqp1 + 20);
                                                    if ($naqp2 !== false) {
                                                        $naqp1 = strpos($inhtml, '>', $naqp1);
                                                        if ($naqp1 !== false) $naqp1++;
                                                        $naqp2 -= 7;
                                                        $inhtml_2 = substr($inhtml, $naqp1, $naqp2 - $naqp1);
                                                        $naqp2 = strrpos($inhtml_2, '<');
                                                        if ($naqp1 * $naqp2 > 0) {//都是存在的:
                                                            $inlovehtml = substr($inhtml_2, 0, $naqp2);
                                                            $inlovehtml = preg_replace('/<(\w+)[^>]*>(□|■|R|S)<\/\\1>/ius','√',$inlovehtml);
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                        //删除标题:
                                        $qwlines = array();
                                        $subtds  = select_elements($rows[$j],'td','>');
                                        foreach($subtds as &$subtd){
                                            $subnodes = $subtd->children;
                                            foreach($subnodes as &$subnode){
                                                $lineval = preg_replace('/^[\s　'.PHP_EOL.']+|[\s　'.PHP_EOL.']+$/us','',strip_tags($subnode->innertext()));
                                                if(!empty($lineval)){
                                                    $do_del = false;
                                                    if(in_array($lineval,$del_lines))
                                                        $do_del = true;
                                                    else{
                                                        foreach($del_lines as $del_line){
                                                            $dlp = strpos($lineval,$del_line);
                                                            if($dlp !== false){
                                                                if(substr($lineval,$dlp) == $del_line){
                                                                    $do_del = true;
                                                                    break;
                                                                }
                                                            }
                                                        }
                                                    }
                                                    if(!$do_del) $qwlines[] = $lineval;
                                                }
                                            }
                                        }
                                        if(!empty($qwlines)){
                                            $qtitle = '';
                                            $wcontent = '';
                                            $docdatas['访谈内容'] = array();
                                            $docdataqw = &$docdatas['访谈内容'];
                                            foreach($qwlines as &$qwline){
                                                $matches = null;
                                                if(preg_match('/^(\d+|热身话题|[１２３４５６７８９０]+|[一二三四五六七八九十零]+)[\s\.\:：。．]+.+/isu',$qwline,$matches)){
                                                    if(!empty($qtitle)){
                                                        $docdataqw[$qtitle] = preg_replace('/^[\s　'.PHP_EOL.']+|[\s　'.PHP_EOL.']+$/us','',$wcontent);//问题与答案
                                                        $wcontent = '';
                                                        if(!empty($inlovehtml) && count($docdataqw) > $question_count+1 && $inlovehtml != '-'){
                                                            similar_text('19.以下哪个因素对您的婚恋观念影响比较大？',$qtitle,$percentV);
                                                            if($percentV >= 80){
                                                                $lovep2 = array();
                                                                $inlovehsp = strpos($inlovehtml,'为什么');
                                                                $lovep2[0] = $inlovehtml;
                                                                $lovep2[1] = '';
                                                                if($inlovehsp != false){
                                                                    $inlovehsp1 = strrpos(substr($inlovehtml,0,$inlovehsp),'<',$inlovehsp-100);
                                                                    $inlovehsp2 = strpos($inlovehtml,'>',$inlovehsp)+1;
                                                                    $lovep2[0] = substr($inlovehtml,0,$inlovehsp1);
                                                                    $lovep2[1] = substr($inlovehtml,$inlovehsp2);
                                                                }
                                                                $lovep2_0 = strip_tags($lovep2[0]);
                                                                $docdataqw[$qtitle] = GetDomSelectValue($lovep2_0);
                                                                $ywg = preg_replace('/^[\s　]+|[\s　]+$/us','',strip_tags($lovep2[1]));
                                                                if(!empty($ywg)) $docdataqw[$qtitle] .= ':'.$ywg;
                                                                $inlovehtml = '-';
                                                            }
                                                        }
                                                    }
                                                    $qtitle = $qwline;
                                                }
                                                else{
                                                    $qwlineX = preg_replace('/^[\s　]+|[\s　]+$/us','',$qwline);
                                                    if(!empty($qwlineX)){
                                                        if(!empty($wcontent)) $wcontent .= ANSWER_NEWLINE.$qwlineX;
                                                        else $wcontent = $qwlineX;
                                                    }
                                                }
                                            }
                                            if(!empty($qtitle))  $docdataqw[$qtitle] = trim($wcontent);//最后一个问题与答案
                                            $getisnum = (float)count($docdataqw);
                                            unset($docdataqw);
                                            if( $getisnum/ $question_count >= 0.85)   break;//完成
                                        }
                                    }
                                }
                                $ft_name =isset($docdatas['访谈人'])?preg_replace('/^[\s　]+|[\s　]+$/us','',$docdatas['访谈人']):'';
                                if(empty($ft_name)){//从$dkey_t中分析:
                                   $vnames =  preg_split('/[\s\-\[\]【】（）()~\:,，：]+/us',$dkey_t,-1,PREG_SPLIT_NO_EMPTY);
                                   $myvn = array();
                                   foreach($vnames as $vname){
                                       $vnLen = xn_strlen($vname);
                                       if($vnLen < 2 || $vnLen > 12 || is_numeric($vname) || strpos($vname,'人员') !== FALSE || strpos($vname,'副本') !== FALSE || strpos($vname,'问卷') !== FALSE || strpos($vname,'访谈') !== FALSE || strpos($vname,'主任') !== FALSE || strpos($vname,'经理') !== FALSE  || strpos($vname,'员工') !== FALSE || strpos($vname,'职工') !== FALSE) continue;
                                       $myvn[] = $vname;
                                   }
                                   if(!empty($myvn)){
                                       $ft_name = $myvn[count($myvn)-1].'*';
                                   }
                                   else{
                                       $anonymous_id++;
                                       $ft_name = '某某'.$anonymous_id.'*';
                                   }
                                    $docdatas['访谈人'] = $ft_name;
                                }
                                if(!empty($ft_name) && strlen($ft_name) > 2) {
                                    $getisnum = 0;
                                    if (!empty($docdatas['访谈内容'])) $getisnum = count($docdatas['访谈内容']);
                                    if ($getisnum != $question_count){
                                        $oqr = OrderQWItems_xjdl($qwlines);
                                        if($oqr != false){
                                            $docdatas['访谈内容'] = $oqr;
                                            $getisnum = count($docdatas['访谈内容']);
                                        }
                                    }
                                    if ($getisnum != $question_count){
                                        $ErrMsg[$dkey] = '文档访谈内容不规范!';  //记录错误
                                    }
                                    else{
                                        if (!empty($ft_name)) {
                                            $incv = 1;
                                            $ft_name_r = $ft_name;
                                            while (array_key_exists($ft_name_r, $docDatasQueue)) {
                                                $ft_name_r = $ft_name . $incv++;
                                            }
                                            $docDatasQueue[$ft_name_r] = &$docdatas;
                                        } else
                                            $docDatasQueue[] = &$docdatas;
                                        unset($docdatas);
                                    }
                                }
                                else{
                                    $ErrMsg[$dkey] = '文档中访谈人缺失!';
                                }
                            }
                            else{
                                $ErrMsg[$dkey] ='文档项目内容不完整!';  //记录错误
                            }
                        }
                        elseif($doctype == 'gdhmzgft') {
                            $table = $body->find('table', 0);
                            $rows = select_elements($table, 'tr', '>');
                            if (count($rows) == 0) {
                                $tbody1 = $body->find('tbody', 0);
                                $rows = select_elements($tbody1, 'tr', '>');
                            }
                            //先取得文档标题:
                            $levels1 = select_elements($body, 'p', '>');
                            select_elements($body, 'div', '>', $levels1);
                            if (count($levels1) > 0) {
                                $lineselect1 = null;
                                $dkey_p = strrpos($dkey, '.', 1);
                                $dkey_t = substr($dkey, 0, $dkey_p);
                                unset($dkey_p);
                                foreach ($levels1 as $eflag => &$edom) {
                                    $edomhtml = $edom->innertext();
                                    $linew = trim(strip_tags($edomhtml));
                                    if (xn_strlen($linew) > 10) {
                                        $gspos = strpos($linew, '公司');
                                        if ($gspos === false) $gspos = strpos($linew, '集团');
                                        if ($gspos > 0) {
                                            $docdatas['单位'] = substr($linew, 0, $gspos + strlen('公司'));
                                        } else {
                                            $docdatas['单位'] = str_replace('青年职工访谈记录表', '', $linew);
                                        }
                                        $docdatas['文档名'] = $dkey_t;
                                        $lineselect1 = null;
                                        break;
                                    }
                                    if ($lineselect1 == null) $lineselect1 = $linew;
                                }
                                if (!empty($lineselect1)) {
                                    $docdatas['单位'] = '';
                                    $docdatas['文档名'] = $dkey_t;
                                }

                            }
                            if (count($rows) > 2) {
                                //读取一般项(第一行):
                                $tds = select_elements($rows[0], 'td', '>');
                                for ($i = 0; $i < count($tds); $i++) {
                                    $dik = preg_replace('/^[\s　]+|[\s　]+$/us', '', strip_tags($tds[$i]->innertext()));
                                    if (!empty($dik)) {
                                        $i++;
                                        if ($i < count($tds)) {
                                            $div = preg_replace('/^[\s　]+|[\s　]+$/us', '', strip_tags($tds[$i]->innertext()));
                                            $docdatas[$dik] = $div;
                                        } else {
                                            $ErrMsg[$dkey] = '文档访谈内容不规范!';  //记录错误
                                            continue 2;
                                        }
                                    }
                                }
                                //岗位类别,行二:
                                $row3h = trim(strip_tags($rows[1]->find('td', 0)->innertext()));
                                $gwlb = '';
                                $tds = $rows[1]->find('td', 1);
                                if ($tds != null) {
                                    $ftxts = trim($tds->text());
                                    //先找√
                                    $fchrs = array('√', '✔', '☑', '☒', '■', '★', '▲', '◎', '☆', '●', '◆', '△');
                                    $fclen = 1;
                                    foreach ($fchrs as $fc) {
                                        $px1 = strpos($ftxts, $fc);
                                        if ($px1 !== false) {
                                            $fclen = strlen($fc);
                                            break;
                                        }
                                    }
                                    if ($px1 === false) $px1 = strpos($ftxts, '□ ');
                                    if ($px1 !== false) {
                                        $px2 = strpos($ftxts, '□', $px1 + $fclen);
                                        if ($px2 === false) $px2 = strpos($ftxts, '■', $px1 + $fclen);
                                        if ($px2 === false) $px2 = strlen($ftxts) - 1;
                                        $gwlb = preg_replace('/^[\s　' . PHP_EOL . '√☆★●◆■▲△◎□☑☒✔]+|[\s　' . PHP_EOL . '√☆★●◆■▲△◎□☑☒✔]+$/us', '', substr($ftxts, $px1 + $fclen, $px2 - $px1 - $fclen));
                                        $px1 = strpos($gwlb, ' ');
                                        if ($px1 > 3) $gwlb = substr($gwlb, 0, $px1);
                                    }
                                }
                                $docdatas[$row3h] = $gwlb;
                            }
                            //处理访谈选择内容:
                            $qwlines = array();
                            for($j=2;$j<count($rows);$j++){
                                $inhtml = $rows[$j]->innertext();
                                if(strpos($inhtml,'当下国家的发展形势') > 0){
                                    $qwlines = array();
                                    $subtds  = select_elements($rows[$j],'td','>');
                                    foreach($subtds as &$subtd){
                                        $subnodes = $subtd->children;
                                        foreach($subnodes as &$subnode){
                                            $lineval = preg_replace('/^[\s　]+|[\s　]+$/us','',strip_tags($subnode->innertext()));
                                            if(!empty($lineval)){
                                                $qwlines[] = $lineval;
                                            }
                                        }
                                    }
                                    if(!empty($qwlines)){
                                        $qtitle = '';
                                        $wcontent = '';
                                        $docdatas['访谈内容'] = array();
                                        $docdataqw = &$docdatas['访谈内容'];
                                        $selects = null;
                                        foreach($qwlines as &$qwline){
                                            $matches = null;
                                            if(preg_match('/^(\d+|[１２３４５６７８９０]+|[一二三四五六七八九十零]+)[\s\.\:：。．]+(.+?)[\(\[【（]?([A-Z\s　]*[\)\]）】]?\s*|[\:：].*)$/isu',$qwline,$matches)){
                                                if(!empty($qtitle)){
                                                    $docdataqw[$qtitle] = $wcontent;//问题与答案
                                                    $wcontent = '';
                                                }
                                                if(in_array(trim($matches[3]),array(')',']','）','】'))) {
                                                    $matches[3] = 'Z'.$matches[3];// 不存在的项
                                                }
                                                $selects = strtoupper(preg_replace('/[^A-Z]+/us','',$matches[3]));
                                                if($selects != ''){
                                                    $selects = preg_split('//us',$selects,-1,PREG_SPLIT_NO_EMPTY);
                                                }
                                                else{
                                                    $selects = preg_replace('/^[\s　\:：]+|[\s　]+$/us','',$matches[3]);
                                                    if(!empty($selects)) $wcontent = $selects;
                                                }
                                                $qtitle = $matches[2];
                                            }
                                            else{
                                                $qwlineX = preg_replace('/^[\s　]+|[\s　]+$/us','',$qwline);
                                                if(!empty($qwlineX)){
                                                    if(is_array($selects)){
                                                        if(preg_match('/^([A-Za-z])\s*[\s\.\:：。．]+\s*(.+)/su',$qwlineX,$matchesX)){
                                                            if(in_array(strtoupper($matchesX[1]),$selects)){
                                                                if(!empty($wcontent)) $wcontent .= ANSWER_NEWLINE.$matchesX[2];
                                                                else $wcontent = $matchesX[2];
                                                            }
                                                        }
                                                    }
                                                    else{//填空题:
                                                        if(!empty($wcontent)) $wcontent .= ANSWER_NEWLINE.$qwlineX;
                                                        else $wcontent = $qwlineX;
                                                    }
                                                }
                                            }
                                        }
                                        if(!empty($qtitle))  $docdataqw[$qtitle] = $wcontent;//最后一个问题与答案
                                        $getisnum = (float)count($docdataqw);
                                        unset($docdataqw);
                                        if( $getisnum/ 27 >= 0.85)   break;//完成
                                    }
                                }
                            }
                            $ft_name =isset($docdatas['填表人'])?preg_replace('/^[\s　]+|[\s　]+$/us','',$docdatas['填表人']):'';
                            if(empty($ft_name)){//从$dkey_t中分析:
                                $vnames =  preg_split('/[\s\-\[\]【】（）()~\:,，：]+/us',$dkey_t,-1,PREG_SPLIT_NO_EMPTY);
                                $myvn = array();
                                foreach($vnames as $vname){
                                    $vnLen = xn_strlen($vname);
                                    if($vnLen < 2 || $vnLen > 12 || is_numeric($vname) || strpos($vname,'人员') !== FALSE || strpos($vname,'副本') !== FALSE || strpos($vname,'问卷') !== FALSE || strpos($vname,'访谈') !== FALSE || strpos($vname,'主任') !== FALSE || strpos($vname,'经理') !== FALSE  || strpos($vname,'员工') !== FALSE || strpos($vname,'职工') !== FALSE || strpos($vname,'附件') !== FALSE) continue;
                                    $myvn[] = $vname;
                                }
                                if(!empty($myvn)){
                                    $ft_name = $myvn[count($myvn)-1].'*';
                                }
                                else{
                                    $anonymous_id++;
                                    $ft_name = '某某'.$anonymous_id.'*';
                                }
                                $docdatas['访谈人'] = $ft_name;
                            }
                            if(!empty($ft_name) && strlen($ft_name) > 2) {
                                $getisnum = 0;
                                if (!empty($docdatas['访谈内容'])) $getisnum = count($docdatas['访谈内容']);
                                if ($getisnum != 27){
                                    $ErrMsg[$dkey] = '文档访谈内容不规范!';  //记录错误
                                }
                                else{
                                    if (!empty($ft_name)) {
                                        $incv = 1;
                                        $ft_name_r = $ft_name;
                                        while (array_key_exists($ft_name_r, $docDatasQueue)) {
                                            $ft_name_r = $ft_name . $incv++;
                                        }
                                        $docDatasQueue[$ft_name_r] = &$docdatas;
                                    } else
                                        $docDatasQueue[] = &$docdatas;
                                    unset($docdatas);
                                }
                            }
                            else{
                                $ErrMsg[$dkey] = '文档中填表人缺失!';
                            }
                        }




                    }
                        //todo:其它格式的文档处理:

                    }
                else{
                    $ErrMsg[$dkey] ='文档不能正确解析!';
                }

            }
            $succ_rows = count($docDatasQueue);
            $err_message = '共有文档'.count($alldocs).'个,成功处理了'.$succ_rows.'个文档!';
            if(!empty($ErrMsg)){
                $err_message .= "\n\n错误信息:\n";
                foreach($ErrMsg as $fname => $msgv){
                    $err_message .= $fname."\t:".$msgv."\n";
                }
            }
            //输出内容:
            if($succ_rows > 0){
                switch ($doctype){
                    case 'xjdlzgft':
                    case 'gdhmzgft':
                        $down_file_name = $doctype . "_" . date("YmdHis") . ".csv";
                        $csv_out = new  CSVOpt();
                        //处理字段,展开问题:
                        $headtb = null;
                        foreach($docDatasQueue as &$ddqv){
                            $ddqv = array_merge($ddqv,$ddqv['访谈内容']);
                            unset($ddqv['访谈内容']);
                            if($headtb == null){
                                $headtb = $ddqv;
                                foreach($headtb as $onK => &$onV){
                                    $onV = $onK;
                                    unset($onV);
                                }
                            }
                        }
                        array_unshift($docDatasQueue,$headtb);//加上表头
                        $csv_out->WriteCsv($pathname.DIRECTORY_SEPARATOR.$down_file_name,$docDatasQueue);
                        $paLen = strlen(APP_PATH.'upload/docs');
                        if(strlen($pathname) > $paLen){
                            $down_file_name = substr($pathname,$paLen).$down_file_name;
                        }
                        else
                            $down_file_name = $down_file_name;
                        break;
                    default:
                        break;


                }
            }

        }
    }
    else $err_message = '操作密码错误,无权操作!';
    }
    else $err_message = '无效的HTML存放目录!通常可以留空!';
}
elseif(!empty($fd_name)){ //下载:
    $fd_name = str_replace('..','_',$fd_name);
    $fd_name = str_replace('./','',$fd_name);
    $csv_out = new  CSVOpt();
    $d_f_path = $pathname.DIRECTORY_SEPARATOR.$fd_name;
    if(is_file($d_f_path)){
        if($csv_out->DownloadCsv($d_f_path))
            exit();
    }
    else{
        $err_message = $fd_name.'文件不存在,或者目录错误!';
    }
}
$header['title'] ='北京慧明国鼎科技有限公司';
$header['description'] = '深度防御，正义军工让弱势民族拨云见日！我们带领AI为人类服务走向智慧生活,构建生态文明。';
include _include(APP_PATH.'plugin/ghx_parsedoc/htm/parsedoc.htm');





